<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-else if</title>
</head>
<body>
    <div id="app">
        <span v-if="isUser">
            <label for="username">用户账号：</label>
            <input id="username" type="text" key="用户账号"/>
        </span>
        <span v-else>
            <label for="userEmail">用户邮箱：</label>
            <input id="userEmail" type="email" key="用户邮箱"/>
        </span>
        <button @click="isUser = !isUser">切换登录类型</button>
    </div>
</body>
    <script src="../js/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
               isUser: true,
            },
            methods: {

            },
            computed: {

            },
        })
    </script>
</html>